home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue49 / ComCorn / CmdBarHack.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-01  |  531 b   |  19 lines

  1. unit CmdBarHack;
  2.  
  3. interface
  4.  
  5. // Since "CommandBars" is both a type name and a property name in the Office_TLB
  6. // unit, we can't call OleVariant.CommandBars from any unit that uses Office_TLB
  7. // because the compiler will think we're referring to the type name.  Therefore,
  8. // this unit is intended to hack around the problem. 
  9. function GetAppCommandBars(const App: OleVariant): IDispatch;
  10.  
  11. implementation
  12.  
  13. function GetAppCommandBars(const App: OleVariant): IDispatch;
  14. begin
  15.   Result := App.CommandBars;
  16. end;
  17.  
  18. end.
  19.